<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>9.ajax_jQuery</title>
    <style>
        #content{
            width: 300px;
            height: 200px;
            background: aquamarine;
        }
    </style>
    <title>8.ajax_avoid_multiple_req.html</title>
</head>
<body>
<div id="content">
</div>
<button id="btn">提交</button>

<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
  <script>
      $("#btn").click(()=>{
          // $.ajax({
          //   url:"./get_json",
          //   method: 'POST',
          //   data:{name: "Alice"},
          //   dataType: 'json',  //回显数据格式
          //   success:(data)=>{
          //       console.log(data)
          //   }
          // })

          $.get("./get_json",{name:"Tom"},(data)=>{
              console.log(data);
          },'json')
      })
  </script>


</body>
</html>